package com.bjpowerrnode.functionalInterface.consumerInterface;

import java.util.function.Consumer;

public class Test1 {
    public static void main(String[] args) {
        Object o = Utils.consumerString(user -> {
            user.setAge(30);
        });

        System.out.println(o);
    }
}

class Utils{
    public static  User consumerString(Consumer<User> consumer){
        User user = new User("sxt",25);
        consumer.accept(user);
        return user;
    }

}